namespace BandAid.DalCE
{
    partial class SHOW_SONGS
    {
        public string SongName
        {
            get
            {
                if (string.IsNullOrEmpty(_songName))
                {
                    SONGS s = ProcessLogic.Instance.GetSongById(this.SONG_ID);

                    if (s != null)
                    {

                        _songName = s.TITLE;
                    }
                    else
                        return "Invalid song! PANIC!";
                }

                return _songName;
            }

           

        }
        private string _songName;


        public int SongLength
        {
            get
            {

                if (_songLength == -1)
                {
                    SONGS s = ProcessLogic.Instance.GetSongById(this.SONG_ID);

                    if (s != null)
                    {
                        _songLength = s.LENGTH;
          
                    }
                    else
                        return 0;
                }

                return _songLength; ;

            }


        }
        private int _songLength = -1;
    }

    partial class PLACES
    {
        public override string ToString()
        {
            return this.NAME + " - " + this.ADDRESS;
        }
    }
}
